<sf-item-wrap [id]="id"
              [schema]="schema"
              [ui]="ui"
              [showError]="showError"
              [error]="error"
              [showTitle]="schema.title">

  <ng-template #ipt>
    <input nz-input
           [attr.id]="id"
           [disabled]="disabled"
           [attr.disabled]="disabled"
           [nzSize]="ui.size"
           [ngModel]="value"
           (ngModelChange)="setValue($event)"
           [attr.maxLength]="schema.maxLength || null"
           [attr.type]="ui.type || 'text'"
           [attr.placeholder]="ui.placeholder"
           [attr.autocomplete]="ui.autocomplete"
           [attr.autoFocus]="ui.autofocus">
  </ng-template>

  <ng-container *ngIf="type === 'addon'; else ipt">
    <nz-input-group [nzAddOnBefore]="ui.addOnBefore"
                    [nzAddOnAfter]="ui.addOnAfter"
                    [nzAddOnBeforeIcon]="ui.addOnBeforeIcon"
                    [nzAddOnAfterIcon]="ui.addOnAfterIcon"
                    [nzPrefix]="ui.prefix"
                    [nzPrefixIcon]="ui.prefixIcon"
                    [nzSuffix]="ui.suffix"
                    [nzSuffixIcon]="ui.suffixIcon">
      <ng-template [ngTemplateOutlet]="ipt"></ng-template>
    </nz-input-group>
  </ng-container>
</sf-item-wrap>
